<?php 
define('IN_QY',true);
session_start();
require("include/common.inc.php");
require("popped.php");

	$sqll="SELECT * FROM tbl_mother_article WHERE id= ".$_GET['id'];
	$query= mysql_query($sqll);
	$rowl=mysql_fetch_array($query);
//
	$sqlbs="SELECT * FROM tbl_user WHERE id= '".$rowl['uid']."'";
	$querybs= mysql_query($sqlbs);
	$rowbs=mysql_fetch_array($querybs);
	
	$tday=date("Y-m-d H:i:s");
	$d1 = strtotime($rowbs['ctime']);  
    $d2 = strtotime($tday);  
    $Days = round(($d2-$d1)/3600/24); 
	// echo 	$Days;
//	
	
	$sqlscang = "SELECT * from tbl_mother_article_collect  where article_id='".$_GET['id']."' and uid='".$_COOKIE['userid']."' ";
    $queryscang=mysql_query($sqlscang);
    $rowscang=mysql_fetch_array($queryscang);
	if($rowscang){
	$ifscang=1;
	}else {
	$ifscang=0;		
	}	
	
	$sqldianzan = "SELECT * from tbl_mother_article_love  where article_id='".$_GET['id']."' and uid='".$_COOKIE['userid']."' ";
    $querydianzan=mysql_query($sqldianzan);
    $rowdianzan=mysql_fetch_array($querydianzan);
						
	if($rowdianzan){
	$ifdianzan=1;
	}else {
	$ifdianzan=0;		
	}	

?>


<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>蜜圈详情</title>
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
        <meta content="yes" name="apple-mobile-web-app-capable"/>
        <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
        <meta content="telephone=no" name="format-detection"/>
        <link href="/ui/xianzhi/css/style.css" rel="stylesheet" type="text/css"/>
        <link href="/ui/css/swiper.min.css" rel="stylesheet" type="text/css"/>
        <link href="/ui/css/Hui.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript" src="/ui/xianzhi/js/jquery.min.js"></script>
        <script type="text/javascript" src="/ui/xianzhi/js/touchSlider.js"></script>
		<script type="text/javascript" src="/ui/layer/mobile/layer.js"></script>
        <script type="text/javascript" defer="" async="" src="https://track.uc.cn/uaest.js"></script>
        <script type="text/javascript" src="/ui/js/swiper.min.js"></script>   		
		<script src="/ui/script/H.js" type="text/javascript"></script>
        <style>
        .aui-panel {
    padding: 20px 25px;
}

.aui-panel-cell {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    color: #333333;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    position: relative;
}

.aui-card-list .aui-panel-cell:before {
    content: " ";
    position: absolute;
    bottom: 0;
    right: 0;
    height: 1px;
    border-bottom: 1px solid #E5E5E5;
    color: #E5E5E5;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    left: 15px;
}

.aui-panel-cell-hd {
    margin-right: .8em;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    margin-left:-60px;

}

.aui-panel-cell-hd img {
    width: 100%;
    max-height: 100%;
    vertical-align: top;
    display: block;
    border: none;
    border-radius: 100%;
}

.aui-panel-cell-bd {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
}

.aui-panel-cell-bd h4 {
    font-weight: 400;
    font-size: 14px;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: normal;
    word-wrap: break-word;
    word-break: break-all;
}

.aui-panel-cell-bd p {
    color: #9b9b9b;
    font-size: 13px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    padding-top: 4px;
}

.aui-panel-cell-fr {
    text-align: right;
    font-size: 0.7rem;
    
}
.main_img ul li img {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.img_font {
    position: absolute;
}

.img_gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 320px;
    border-bottom: 1px solid #e9e9e9;
    
}.img_font {
    background-image: url('');
    width: 50px;
    height: 24px;
    background-size: 50px;
    background-repeat: no-repeat;
    text-align: center;
    line-height: 26px;
    color: #fff;
    font-size: 13px;
    letter-spacing: 3px;
    position: absolute;
    left: 50%;
    margin-left: -22px;
    bottom: 10px;
}

.aui-flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 15px;
    position: relative;
}
.b-line {
    position: relative;
}

.b-line:after {
    content: '';
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    border-bottom: 1px solid #e2e2e2;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    -webkit-transform-origin: 0 100%;
    transform-origin: 0 100%;
}
.aui-palace-two p {
    font-size: 19px;
    padding: 9px;
}
.aui-footer {
    width: 100%;
    position: relative;
    z-index: 100;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    /* padding: 7px 5px 7px 5px; */
    background-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -2px 9px rgba(0,0,0,.08);
}
.aui-list-icon {
    overflow: hidden;
    padding-top: 10px;
    font-size: 0.6rem;
    padding-left: 15px;
}

.aui-list-icon-col {
    float: left;
    padding-right: 10px;
	display:flex;
	
}
.aui-list-icon-rol {
    float: left;
    padding-right: 10px;
	display:flex;
	
}


.icon-collection {
    width: 15px;
    height: 15px;
    background-size: 15px;
    margin-right: 5px;
    background-image: url('');
}

.icon-comment {
    width: 15px;
    height: 15px;
    background-size: 15px;
    margin-right: 5px;
    background-image: url(/ui/image/收藏黑@3x.png);
 
}
.icon-comment1 {
    width: 15px;
    height: 15px;
    background-size: 15px;
    margin-right: 5px;
    background-image: url(/ui/image/收藏黄@3x.png);
 
}
.icon-collection1 {
    width: 15px;
    height: 15px;
    background-size: 15px;
    margin-right: 5px;
    background-image: url(/ui/image/爱心红@3x.png);

}
.icon-collection2 {
    width: 15px;
    height: 15px;
    background-size: 15px;
    margin-right: 5px;
    background-image: url(/ui/image/评论@3x.png);
}
#txttz{
    text-align: center;
    display: none;
    position: fixed;
    top: 80px;
    left: 38px;
    width: 80%;
    height: 200px;
    background: white;
    border-radius:12px;
    border: 2px solid #ff7f00;
}
#yincang{
    display: none;
}
#queding {
    text-align: center;
    position: fixed;
    top: 246px;
    left: 110px;
    border-radius: 6px;
    background: rgba(189, 189, 189, 0.89);
    color: black;
    width: 55px;
    background: rgba(242, 108, 39, 0.83);
    border: 1px solid #fe5e00;
    color: white;

}
#quxiao {
    position: fixed;
    top: 246px;
    left: 214px;
    border-radius: 6px;
    background: rgba(189, 189, 189, 0.89);
    color: black;
    width: 55px;
    background: rgba(242, 108, 39, 0.83);
    border: 1px solid #fe5e00;
    color: white;
}
.swiper-slide {
    margin-top: 8px;
}
.H-theme-background-color-white.H-padding-horizontal-left-5.H-padding-vertical-bottom-10 {
    height: 117px;
}
img.H-width-100-percent.H-display-block{
    height: 90px;
    width: 90px;
    float: left;
}
.swiper-slide.swiper-slide-active{
    width: 200px;
}
.H-padding-horizontal-both-5.H-padding-vertical-both-5.H-text-show-row-1.H-width-100-percent.H-box-sizing-border-box{
    width: 210px;
    height: 100px;
}
.H-font-size-14.H-text-show-row-1.H-width-100-percent.H-overflow-hidden{
    margin-top: 10px;
}
.H-font-size-12.H-text-show-row-1.H-theme-font-color-999.H-max-width-100-percent{
    margin-top: 10px;
}
.H-theme-font-color7.H-font-size-12.H-text-show-row-1.H-vertical-middle{
    margin-top: 10px;
}
        </style>
    </head>
    <body>
        <section class="aui-flexView">
            <header class="aui-navBar aui-navBar-fixed">
                <a href="javascript:history.back(-1);" class="aui-navBar-item">
                    <i class="icon icon-return"></i>
                </a>
                <div class="aui-center">
                <div class="aui-panel">
                    <a href="javascript:void(0);" class="aui-panel-cell">
                        <div class="aui-panel-cell-hd" >
                            <img id="userimg"src="/ui/xianzhi/images/尿裤湿巾.png" alt="">
                        </div>
                        <div class="aui-panel-cell-bd">
                            <h4 id="username"></h4>
							
								<?php if($rowl['is_business']==1){ ?>
                            <img src="/ui/image/shang.png" alt="" style="width: 10px; float:right; margin:4px 4px;">
							  <?php } ?>	
								<?php if($rowl['is_business']==0){ ?>
							<img src="/ui/image/ge.png" alt="" style="width: 10px; float:right; margin:4px 4px;">
								  <?php } ?>	
							
                            <p>来到蜜圈<?=$Days?>天</p>
                        </div>
                    </a>
                </div>

                </div>

            </header>
            <section class="aui-scrollView">

               <div class="img_gallery" >
                    <div class="main_img">
                        <ul>
					
			<?php
			if($rowl['type']==1){
			$sqlimg="SELECT * FROM tbl_mother_article WHERE id= ".$_GET['id'];
			$rowimg= mysql_query($sqlimg);
			$rowall=mysql_fetch_array($rowimg);
			$imgeve =explode(",", $rowall['show_pic']);
			// print_r($imgeve);
			// $roweve=$rowall['ywyuedu'];
			 $imglen=count($imgeve);
			foreach($imgeve as $src){
				if(strlen($src)<=0){
					continue;
				}else{
				echo "
                  <li><img src='$src' alt=''></li>

					      ";
		              }
			          }				
			}else{
				
						$sqlimg="SELECT * FROM tbl_mother_article WHERE id= ".$_GET['id'];
			$rowimg= mysql_query($sqlimg);
			$rowall=mysql_fetch_array($rowimg);
			 $imglen=json_decode($rowall['pic_arr'], true);
			 
			 $content = '';
			foreach($imglen as $i=>$item){
 $n = $i + 1;
  $content .= "<li><img src='".$item['pic_url']."' alt=''></li>";

			          }		
			      echo $content;	
			}
         
		              ?>
                      

						
                        </ul>
                    </div>
					<!---------
                    <div class="img_font">
                        <span>1/5</span>
                        <span>2/5</span>
                        <span>3/5</span>
                        <span>4/5</span>
                        <span>5/5</span>
                    </div>
					-------------->
                </div>
				
                <div class="aui-flex b-line">
                    <div id="title"  class="aui-flex-box" style="font-weight: 700;">这里是标题</div>
                </div>
                <div class="aui-palace aui-palace-two clearfix ">
                    <div  id="content">	
					</div>
					<div class="H-theme-background-color-white H-padding-horizontal-left-5 H-padding-vertical-bottom-10">
            <div class="swiper-container swiper-container-horizontal swiper-container-free-mode">
                <div class="swiper-wrapper" style="transition-duration: 0ms; transform: translate3d(0px, 0px, 0px);">
				
<?php

			$sqlrec="SELECT * FROM tbl_mother_article WHERE id= ".$_GET['id'];
			$queryrec= mysql_query($sqlrec);
			$rowrec=mysql_fetch_array($queryrec);
			$goods_rec =explode(",",$rowrec['goods_rec']);
			// print_r($imgeve);
			// $roweve=$rowall['ywyuedu'];

			 $imglen2=count($goods_rec);
			 
		if($rowrec['type']==1){
			
		for($i = 0; $i < count($goods_rec); $i++){
$str = $goods_rec[$i];

			$sqlrec1="SELECT * FROM tbl_taospp WHERE id= '".$str."'";
			$queryrec1= mysql_query($sqlrec1);
			$rowrec1=mysql_fetch_array($queryrec1);
            $imgeve2 =explode(",", $rowrec1['img']);

echo 	" <div class='swiper-slide swiper-slide-active' id='spzs' style='margin-right: 5px; width:210px;' id='spzs'>
                        <div  onclick='mqx(".$rowrec1['id'].")' class='H-padding-horizontal-both-5 H-padding-vertical-both-5 H-text-show-row-1 H-width-100-percent H-box-sizing-border-box' style='background: #f7f7f7;'>
                            <span>
                            <img src='".$imgeve2[0]."' class='H-width-100-percent H-display-block'>
                            </span>
                           
                            <span style='float:right;position:fixed;margin-left:10px;'>
                            <div class='H-font-size-14 H-text-show-row-1 H-width-100-percent H-overflow-hidden'>
                                 
                            </div>
                            <div class='H-font-size-12 H-text-show-row-1 H-theme-font-color-999 H-max-width-100-percent'>
                               ".$rowrec1['chtitle']."
                            </div>
                            <div class='H-theme-font-color7 H-font-size-12 H-text-show-row-1 H-vertical-middle'>
                                <span>￥  ".$rowrec1['zswprice']."</span>
                            </div>
                            </span>
                        </div>
                    </div>"	;
}	
		}
				  
 
				  

?>

                </div>
            </div>
        </div>
		             <div class="divHeight"></div>			
					 <p>
                        用户评论
                    </p>
					
					<div id="pinglun">
                    </div>

					

                </div>


     
 

				
				
            </section>


            <footer class="aui-footer">

                <div class="aui-center" style="margin-left: 130px;    width: 89px;">
                 <input type="text" placeholder="说点什么吧" style="border: 1px solid #cccccc;width: 180px;border-radius: 3px;padding: 5px;" id="txtxw" readonly="readonly">
                 <div id="yincang">
                 <textarea placeholder="说说你的真实体验" id="txttz" autofocus="autofocus"></textarea>
                 <input type="button"  id='queding' value="确定">
                 <input type="button" id='quxiao' value="取消">
                </div> 
				 
				 
				       <div onclick="addg()"  class="aui-list-icon-col" style="margin-left: 10px;">
					   
							<?php if($ifdianzan==0){ ?>					   
                            <i id="zanzan" class="icon icon-collection"></i>
 							<?php } ?>  
							<?php if($ifdianzan==1){ ?>					   
                            <i id="zanzan" class="icon icon-collection1"></i>
 							<?php } ?>  							
                         <span id="love_count"> 0</span>
                        
                        </div>
                        <div class="aui-list-icon-rol">
                            <i class="icon icon-collection2"></i>
                           <span id="click_rate"> 0</span>
                           <span id="isgg" style="display:none;"></span>
                        
                        </div>
						
                        <div onclick="adds()" class="aui-list-icon-rol">
						
							<?php if($ifscang==0){ ?>
						
                            <i id="scangg" class="icon icon-comment"></i>
							
							<?php } ?>
							<?php if($ifscang==1){ ?>
						
                            <i id="scangg" class="icon icon-comment1"></i>
							
							<?php } ?>							
							
                           <span id="collect_count"> 0</span>
                           <span id="iscc" style="display:none;"></span>
                        
                        </div>						
				 
                </div>
				
				

			
			
			
			
			
			
            </footer>


        </section>
		
        <script type="text/javascript">
            $(document).ready(function() {

                $(".main_img").touchSlider({
                    flexible: true,
                    speed: 200,
                    btn_prev: $("#btn_prev"),
                    btn_next: $("#btn_next"),
                    paging: $(".point a"),
                    counter: function(e) {
                        $(".point a").removeClass("on").eq(e.current - 1).addClass("on");
                        $(".img_font span").hide().eq(e.current - 1).show();
                    }
                });

            });

function mqx(aaa){
	
window.location.href="/haigou/htspxq.php?fid="+aaa; 
	
	
}
			
			
			
			
        </script>
		
		<script>
		var id='<?=$_GET['id']?>';
		var uid='<?=$_COOKIE['userid']?>';
		var psize='10';
		var type='<?=$rowl['type']?>';		
	
	if(type==1){
    $.ajax({
        url: '/api/muyin/api.php?s=mother.get_mother_article_detail',
        type: 'GET',
        dataType: 'json',
        data: {id: id,
		uid:uid
		},

     
     success: function (data){
         var JSON = eval(data); 


        if (data.code==0) {
	    $("#userimg").attr("src",JSON.data.user_info.username);		
        $("#username").html(JSON.data.user_info.shuyu);	
        $("#title").html(JSON.data.article_detail[0].title);
		
        $("#click_rate").html(JSON.data.article_detail[0].click_rate);		
        $("#love_count").html(JSON.data.love_count);		
        $("#collect_count").html(JSON.data.collect_count);		
        $("#iscc").html(JSON.data.is_collect);
        $("#isgg").html(JSON.data.is_loved);		
		var arrLen = JSON.data.article_detail[0].content.length;
        if(arrLen > 0){
          
		  for(var i=0; i<arrLen; i++){
				
				
					if(JSON.data.article_detail[0].content[i].pic==undefined){
			var result = '';
		   result += '<p>'+JSON.data.article_detail[0].content[i].content+'</p>'
		
          $("#content").append(result);		
						
					} else{
		             var result = '';
		   result += '<p>'+JSON.data.article_detail[0].content[i].content+'</p>'
	
	
		   + ' <img src='+JSON.data.article_detail[0].content[i].pic+' alt="" style="width:94%;margin-left: 3%;">'
		
		   
          $("#content").append(result);												
					}




		  	

          
		  }
		

		}
        }else{
        
	  layer.open({
    content: '没有蜜圈id'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });	
	
	return false;
		
        }
	 }
      })
	  
	  }	else{
		  //照片文章开始
		  
		    $.ajax({
        url: '/api/muyin/api.php?s=mother.get_mother_pic_article_detail',
        type: 'GET',
        dataType: 'json',
        data: {id: id,
		uid:uid
		},

     
     success: function (data){
         var JSON = eval(data); 


        if (data.code==0) {
	    $("#userimg").attr("src",JSON.data.user_info.username);		
        $("#username").html(JSON.data.user_info.shuyu);	
        $("#title").html(JSON.data.article_detail[0].title);
		
        $("#click_rate").html(JSON.data.article_detail[0].click_rate);		
        $("#love_count").html(JSON.data.love_count);		
        $("#collect_count").html(JSON.data.collect_count);		
        $("#iscc").html(JSON.data.is_collect);
        $("#isgg").html(JSON.data.is_loved);		
		var arrLen = JSON.data.article_detail[0].pic_arr.length;
        if(arrLen > 0){
          
		  for(var i=0; i<arrLen; i++){
				
				
					if(JSON.data.article_detail[0].pic_arr[i].pic_url==undefined){
	
						
					} else{
		             var result = '';
		   result += '<img src='+JSON.data.article_detail[0].pic_arr[i].pic_url+' alt="" style="width:94%;margin-left: 3%;">'
		
		   
          $("#content").append(result);												
					}

          
		  }
		

		}
        }else{
        
	  layer.open({
    content: '没有蜜圈id'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });	
	
	return false;
		
        }
	 }
      })  
  
	  }

	  
	//评论开始  
	   $.ajax({
        url: '/api/muyin/api.php?s=mother.get_article_comment_list',
        type: 'GET',
        dataType: 'json',
        data: {psize: psize,
		article_id:id
		},

     
     success: function (data){
         var JSON = eval(data); 


        if (data.code==0) {		
		var arrLen = JSON.data.length;
        if(arrLen > 0){
          
		  for(var i=0; i<arrLen; i++){
							
             var result = '';
		   result += '<p>'
                      +' <img src="'+JSON.data[i].username+'" alt="" style="width: 31px;">'
					  + '<span style="margin-top: 5px;position: absolute;margin-left: 10px;font-size: 19px;">'+JSON.data[i].shuyu+'</span>'
                   +' </p>	'
					+'<p>'+JSON.data[i].content+'</p>'
          $("#pinglun").append(result);
          
		  }
		

		}
        }else{
        
	  layer.open({
    content: '没有id'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });	
	
	return false;
		
        }
	 }
      })  
	  
	  

		</script>

		<script>
		
		  function adds(){
			  
		var article_id='<?=$_GET['id']?>';
		var uid='<?=$_COOKIE['userid']?>';
		var domsc=document.getElementById("scangg");	
		if(uid==""){
            layer.open({
    content: '即将带您去登录？'
    ,btn: ['去登录', '取消']
    ,yes: function(index){
    window.location.href="mlogin.php"
      layer.close(index);
    }
  });	
		return false;	
		}
		
		
		
			if ($("#iscc").text() == '1' ) {
             $("#iscc").text('0');
			     $.ajax({
        url: '/api/muyin/api.php?s=mother.cancel_article_collect',
        type: 'POST',
        dataType: 'json',
        data: {uid: uid,
		article_id:article_id
		
		},
      })
      .done(function(respon) {
        if (respon.code==0) {
             layer.open({
    content: '取消收藏成功'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });
  
  
        var countzan=$("#collect_count").text();
      var countzan1=parseInt(countzan)-1;
      $(domsc).removeClass('icon-comment1');
      $(domsc).addClass('icon-comment');
  	 $("#collect_count").text(countzan1);
        }else{
            
        
        }
      })
             } else {
            $("#iscc").text('1');
			    $.ajax({
        url: '/api/muyin/api.php?s=mother.add_article_collect',
        type: 'POST',
        dataType: 'json',
        data: {uid: uid,
		article_id:article_id
		
		},
      })
      .done(function(respon) {
        if (respon.code==0) {
             layer.open({
    content: '收藏成功'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });
  
      var countzan=$("#collect_count").text();
      var countzan1=parseInt(countzan)+1;
      $(domsc).removeClass('icon-comment');
      $(domsc).addClass('icon-comment1');
  	 $("#collect_count").text(countzan1);
  
  
  
        }else{
            
        
        }
      })		
     }  
  }	
		</script>
		
		
		
		<script>
		
		  function addg(){
			  
		var article_id='<?=$_GET['id']?>';
		var uid='<?=$_COOKIE['userid']?>';
		var domzan=document.getElementById("zanzan");
	
		if(uid==""){
            layer.open({
    content: '即将带您去登录？'
    ,btn: ['去登录', '取消']
    ,yes: function(index){
    window.location.href="mlogin.php"
      layer.close(index);
    }
  });	
		return false;	
		}
		
		
		
			if ($("#isgg").text() == '1' ) {
             $("#isgg").text('0');
			     $.ajax({
        url: '/api/muyin/api.php?s=mother.cancel_article_love',
        type: 'POST',
        dataType: 'json',
        data: {uid: uid,
		article_id:article_id
		
		},
      })
      .done(function(respon) {
        if (respon.code==0) {
             layer.open({
    content: '取消关注成功'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });
  
          var countzan=$("#love_count").text();
      var countzan1=parseInt(countzan)-1;
      $(domzan).removeClass('icon-collection1');
      $(domzan).addClass('icon-collection');
  	 $("#love_count").text(countzan1);
  
  
  
  
        }else{
            
        
        }
      })
             } else {
            $("#isgg").text('1');
			    $.ajax({
        url: '/api/muyin/api.php?s=mother.add_article_love',
        type: 'POST',
        dataType: 'json',
        data: {uid: uid,
		article_id:article_id
		
		},
      })
      .done(function(respon) {
        if (respon.code==0) {
             layer.open({
    content: '关注成功'
    ,skin: 'msg'
    ,time: 2 //2秒后自动关闭
  });
  
        var countzan=$("#love_count").text();
      var countzan1=parseInt(countzan)+1;
      $(domzan).removeClass('icon-collection');
      $(domzan).addClass('icon-collection1');
  	 $("#love_count").text(countzan1);
  
  
  
  
  
  
        }else{
            
        
        }
      })		
     }  
  }	
		</script>	
        <script>
		
		//评论
            window.onload=function(){
                var oDiv=document.getElementById('yincang');
                var oBtn=document.getElementById('txtxw');
                var oTxt=document.getElementById('txttz');
                var oQd=document.getElementById('queding');
                var oQx=document.getElementById('quxiao');
                var cc='<?=$_COOKIE['userid']?>';
                oBtn.onclick=function(){
                    oDiv.style.display='block';
                    oTxt.style.display='block';
                    oQd.style.display='block';
                    oQx.style.display='block';
                    oTxt.focus();
					
				if(cc==""){
                        layer.open({
    content: '即将带您去登录？'
    ,btn: ['去登录', '取消']
    ,yes: function(index){
    window.location.href="mlogin.php"
      layer.close(index);
    }
  });		
					return false;	
					}
					
					
					
                };
                oQd.onclick=function(){
                    oBtn.value=oTxt.value;
					
					if(oBtn.value==""){
					layer.open({
                     content: '请输入评论内容'
                    ,skin: 'msg'
                    ,time: 2 //2秒后自动关闭
                     });		
					return false;	
					}
					
					if(cc==""){
                        layer.open({
    content: '即将带您去登录？'
    ,btn: ['去登录']
    ,yes: function(index){
    window.location.href="mlogin.php"
      layer.close(index);
    }
  });		
					return false;	
					}
					
					$.ajax({
        url: '/api/muyin/api.php?s=mother.add_article_comment',
        type: 'POST',
        dataType: 'json',
        data: {uid: cc,
		article_id:id,
		content:oBtn.value
		
		},
      })
      .done(function(respon) {
        if (respon.code==0) {
             layer.open({
    content: '评论成功！'
    ,skin: 'msg'
    ,time: 1 //2秒后自动关闭
  });
        }else{
            
        
        }
      })
                   function tan() {
                    oTxt.style.display='none';
                    oQd.style.display='none';
                    oQx.style.display='none';
					location.reload();
                    }

					setTimeout(tan, 1100);
					
					
                };
                oQx.onclick=function(){
                    
                    oTxt.style.display='none';
                    oQd.style.display='none';
                    oQx.style.display='none';

                };
            };
        </script>	
        <script type="text/javascript">
        var swiper3 = new Swiper('.swiper-container', {
            slidesPerView: 2.3,
            spaceBetween: 5,
            slidesPerView: "auto",
            freeMode: true

        });
    </script>
   

    </body>
</html>



